<template>
	<view class="box">
		<view>新闻列表</view>
		<navigator url="/pages/index/index">挑战index</navigator>
		
		<view @click="alertMsg">弹窗</view>
		
		<icon type="success" size="26"/>
		<text>java</text>
		<text>vue</text>
		<view></view>
		<text user-select selectable>nodejs span</text>
		<br>
		<text space="emsp">vue     js</text>
		<button class="uni-opacity-disabled">提交</button>
		
		<image class="myimg" src="../../static/images/shuijiao.jpg" aspectFit >
			
			
			
		</image>
		
		<scroll-view class="scroll" scroll-x scroll-y>
			<view class="group">
				<view class="item">
					111
				</view>
				<view class="item">
					111
				</view>
				<view class="item">
					111
				</view>
				<view class="item">
					111
				</view>
				<view class="item">
					111
				</view>
			</view>
		</scroll-view>
		
		<view class="uni-margin-wrap">
			<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
				:duration="duration">
				<swiper-item>
					<view class="swiper-item uni-bg-red">A</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item uni-bg-green">B</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item uni-bg-blue">C</view>
				</swiper-item>
			</swiper>
		</view>
		
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: ['color1', 'color2', 'color3'],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500
			};
		},
		methods:{
			changeIndicatorDots(e) {
				this.indicatorDots = !this.indicatorDots
			},
			changeAutoplay(e) {
				this.autoplay = !this.autoplay
			},
			intervalChange(e) {
				this.interval = e.target.value
			},
			durationChange(e) {
				this.duration = e.target.value
			},
			alertMsg(){
				uni.showToast({
					title:"不能为空哦",
					
				})
			}
		}
	}
</script>

<style lang="scss">
	.box{
		width: 750rpx;
		height: 700rpx;
	}
	
	.myimg{
		width: 100%;
		height:350rpx;
	}
	
	.scroll{
		widht:750rpx;
		height: 200rpx;
		border: 1px solid red;
		
		.group{
			white-space: nowrap;
			.item{
				width:750rpx;
				height: 220rpx;
				background-color: royalblue;
				display: inline-block;
				margin-right:10rpx;
			}
		}
	}
	
	.uni-margin-wrap {
		width: 690rpx;
		width: 100%;
	}
	.swiper {
		height: 300rpx;
	}
	.swiper-item {
		display: block;
		height: 300rpx;
		line-height: 300rpx;
		text-align: center;
	}
	.swiper-list {
		margin-top: 40rpx;
		margin-bottom: 0;
	}
	.uni-common-mt {
		margin-top: 60rpx;
		position: relative;
	}
	.info {
		position: absolute;
		right: 20rpx;
	}
	.uni-padding-wrap {
		width: 550rpx;
		padding: 0 100rpx;
	}

	
	
</style>
